<?php
class Hole implements IJson{
	var $holeid, $course, $holename,$holeorder,$par,$deleted;
	
	function __construct(){}
	
	function toJson(){
		$_json = "{".
				sprintf("\"holeid\":%d,", $this->holeid).
				sprintf("\"course\": {\"courseid\":\"%s\", \"coursename\":\"%s\"},", $this->course->courseid,$this->course->coursename).
				sprintf("\"holename\":\"%s\",", $this->holename).
				sprintf("\"holeorder\":\"%s\",", $this->holeorder).
				sprintf("\"par\":\"%s\",", $this->par).
				sprintf("\"deleted\":%d",$this->deleted).
				"}";
	
		return $_json;
	}
	
	function __destruct(){}
}

?>